<template>
    <div class="big">
            <div>
                    <div class="head">
                        <ul>
                            <li><router-link to="/message">钓况</router-link></li>
                            <li class="hea"><router-link to="/ab">关注</router-link></li>
                            <li><router-link to="/ne">渔汛</router-link></li>
                        </ul>
                        <span class="sp2">
                            <router-link to="/search">
                           <van-icon name="search" />搜钓场</router-link></span>
                    </div>
                    <div class="nav">
                        <span v-for="(item) in tabs" :key="item.til">{{item.til}}</span>
                    </div>
                    <div class="caption">
                        <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
                            <van-swipe-item><img src="https://img1.baidu.com/it/u=2113497278,507990725&fm=253&fmt=auto&app=138&f=JPEG?w=470&h=600" alt=""></van-swipe-item>
                            <van-swipe-item><img src="https://img1.baidu.com/it/u=2289311225,218634674&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=353" alt=""></van-swipe-item>
                            <van-swipe-item><img src="https://img1.baidu.com/it/u=2186291306,2518932653&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=349" alt=""></van-swipe-item>
                        </van-swipe> 
                    </div>
                    <div class="list">
                        <span>头筹</span>
                        <span>我的鱼票</span>
                        <span>鱼获榜单</span>
                        <span>钓场入驻</span>
                    </div>  
                </div>
        <div class="cap">
            <div class="list1" v-for="(item) in neObj" :key="item.id">
                <ul>
                    <li>
                     <span class="po1">{{item.store_name}}</span>
                     <span class="po2">{{item.creat_time}}</span>
                    </li>
                    <li>
                       {{item.title}}
                    </li>
                    <li>
                       <span class="po5">{{item.look}}查看</span>                         
                       <span>{{item.area}}</span>                          
                    </li>
                </ul>
               </div>
         
        </div>
    </div>     
</template>

<script>
import { getNeList } from './api';
export default {
    name: 'HhhIndex',

    data() {
        return {
            neObj:[],
            index:0,
            tabs:[
            {
        til:'热门',
        name:'热门'
    },
    {
        til:'最新',
        name:'最新'
    },
    {
        til:'附近',
        name:'附近'
    },
    {
        til:'+ 发布钓况',
        name:'+ 发布钓况'
    }
           ]
        };
    },

    mounted() {
        this.getNeList()
    },

    methods: {
        getNeList(){
            getNeList().then(res=>{
                this.neObj=res.data
                //console.log(res)
            })
        }
    },
};
</script>

<style scoped>
.my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    line-height: 150px;
    text-align: center;
    height: 150px;
    background-color: #39a9ed;
  }
.big{
    width: 100%;
    height: 95vh;
    display: flex;
    flex-direction: column;
}
.cap{
    flex: 1;
    overflow: auto;
}
.nav span.active{
    background-color: yellowgreen;
    border-radius: 5px;
}
.head{
    width: 100%;
    height: 40px;
    margin-top: 10px;
}
.hea{
    margin-left: 5px;
    margin-right: 5px;
}
.head ul{
    display: flex;
    justify-content: center;
}
ul li.active{
   font-size: 20px;
}
.nav{
    width: 100%;
    height: 40px;
    display: flex;
    flex-direction: row;
    justify-content:  space-around;
    align-items: center;
}
.list{
    width: 100%;
    height: 40px;
    display: flex;
    flex-direction: row;
    justify-content:  space-around;
    align-items: center;
}
.caption{
    width: 100%;
    height: 150px;
    border: 1px solid gray;
}
.caption img{
    width: 100%;
    height: 150px;
}
.sp1{
    margin-left: 15px;
    margin-right: 15px;
}
.sp2{
    position: absolute;
    top: 10px;
    right: 10px;
}
.p6{
    height: 1000px;
}
a{
    color: black;
}
.list1{
    width: 100%;
    height: 130px;
    border: 1px solid gray;
    position: relative;
}
.list1 ul li:nth-of-type(1){
    width: 100%;
    height: 30px;
    display: flex;
    justify-content: space-between;
}
.list1 ul{
    width: 95%;
    margin: 0 auto;
}
.po1{
    position: absolute;
    top: 9px;
    left: 6px;
    font-size:13px;
}
.po2{
    position: absolute;
    top: 9px;
    left: 180px;
    font-size: 10px;
    color: gray;
}
.po3{
    font-size: 15px;
    background-color: yellowgreen;
    border-radius: 5px;
    padding: 2px;
    height: 20px;
}
.list1 ul li:nth-of-type(2) {
    height: 50px;
}
.po4{
    font-size: 13px;
}
.po5{
    font-size: 13px;
    color: gray;
}
.po6{
    font-size: 14px;
    margin-left: 200px;
    margin-right: 5px;
}
.list1 ul li:nth-of-type(3){
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: gray;
}
</style>